package com.ross.logger.factory;

import com.ross.logger.Logger;

import java.util.ServiceLoader;

/**
 * @version 1.0.0
 * @className: LoggerFactory
 * @description:
 * @author: zhangjunfa
 * @date: 2023/9/4 10:59
 */
public class LoggerFactory {
    /**
     * 返回一个消息类
     *
     * @return
     */
    public static Logger getLogger() {
        Logger message = null;
        ServiceLoader<Logger> loader = ServiceLoader.load(Logger.class);
        for (Logger value : loader) {
            message = value;
        }
        return message;
    }
}
